<template>
	<view class="app_Cont">
		<view class="showCont" v-if="showCont">
			<view class="smgCont">
				<view class="msgName">{{formData.article_title}}</view>
				<view class="msgTime">发布时间：{{formData.create_time}}</view>
				<view class="msgCont textWrap">
					{{getInfoText(formData.article_content)}}
				</view>
			</view>
		</view>
		<load v-if="!showCont"></load>
	</view>
</template>

<script>
	import api from '@/http/api.js'
	import load from '@/components/load.vue'
	import converData from "@/utils/converData";
	export default {
		components:{load},
		data() {
			return {
				formData:{},
				detailId:'',
				getInfoText:converData.changeLine,
				showCont:false,
			};
		},
		methods:{
			getData(){
				let data = {
					article_id:this.detailId,
				}
				api.getRequst(data,'/api/My/artDetails').then((res)=>{
					if(res.code==1){
						this.formData = res.data
					}
					this.showCont = true
				})
			},
		},
		onLoad(option) {
			this.detailId = option.id
			this.getData()
		}
	}
</script>

<style lang="less">
.showCont{
	min-height: 100vh;
	padding-bottom:30rpx;
	box-sizing: border-box;
	padding-top: 30rpx;
	.smgCont{
		width: 92%;
		margin: 0 auto;
		padding: 30rpx 4%;
		background-color: #fff;
		border-radius: 20rpx;
		box-sizing: border-box;
		.msgName{
			font-size: 28rpx;
			font-weight: bold;
			text-align: center;
			padding-bottom: 10rpx;
		}
		.msgCont{
			text-indent: 52rpx;
			font-size: 26rpx;
			line-height: 38rpx;
			color: #333;
		}
		.msgTime{
			text-indent: 30rpx;
			font-size: 24rpx;
			color: #333;
			text-align: center;
			padding-bottom: 30rpx;
		}
	}
}
</style>
